import React from 'react'
import { Link, Control } from 'react-keeper'
import 'weui';
import zaifangzi from './../../assets/icon/在建房子.png';
import './icons.less';
import { ButtonArea,Panel,PanelHeader,PanelBody,Page,
  Button,
  CellsTitle,
  CellsTips,
  Cell,
  CellHeader,
  CellBody,
  CellFooter,
  Form,
  FormCell,
  Icon,
  Input,
  Label,
  TextArea,
  Switch,
  Radio,
  Checkbox,
  Select,
  VCode,Flex,
  FlexItem,
  MediaBox,
  MediaBoxHeader,
  MediaBoxBody,
  MediaBoxTitle,
  MediaBoxDescription,
  MediaBoxInfo,
  MediaBoxInfoMeta,Preview,PreviewBody,PreviewItem,Badge,IconBox,
  Agreement,
  Toptips
} from  'react-weui/build/packages';

const appMsgIcon = <img
  src=""/>



export default class YejiInfo extends React.Component {

  constructor(props) {
    super(props);
    this.state = {
    }
  }



  render() {
    return (

        <Panel className="head-panel">
          <PanelHeader>
            <div className="title-bg"/>
            业绩
          </PanelHeader>
          <PanelBody>
            <Flex>
                <FlexItem >
                  <Preview>
                {
                  this.props.engls.map((item, index) => {
                    return <YejiItem eng={item} key={index}/>
                  })
                }
                  </Preview>
              </FlexItem>
            </Flex>
          </PanelBody>
        </Panel>
    )
  }
}

YejiInfo.propTypes = {
  engls: React.PropTypes.object.isRequired,
  imgls: React.PropTypes.object.isRequired
}

class YejiItem extends React.Component {
  constructor(props) {
    super(props);
    this.mypreview = this.mypreview.bind(this);
  }


  mypreview() {
    Control.go('/myinfo/yejiview',this.props.eng);
  }

  render() {
    return (
    <Cell>
      <CellHeader access link onClick={this.mypreview} style={{position: 'relative', marginRight: '10px'}}>

        <img src={zaifangzi} alt="" style={{display: `block`, width: `20px`, marginRight: `5px`}}/>
      </CellHeader>
      <CellBody>
        <p>{this.props.eng.engName}</p>
        <p style={{fontSize: '13px', color: '#888888'}}>{ this.props.eng.engJsdw }</p>
        <p style={{fontSize: '13px', color: '#888888'}}>{ this.props.eng.engAddress }</p>
      </CellBody>
    </Cell>


  )
  }
}
YejiItem.propTypes = {
  eng: React.PropTypes.object.isRequired
}
